﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="ViewPage<PagedSortedList<Customer>>" %>
<asp:Content ContentPlaceHolderID="Content" runat="server">

<% Html.Grid(Model)
.NoResultHtml(() => { %>
	<p>No results found</p>
<% })
.Pager()
.Head(head => { %>
	<%= head.Sortable(c => c.ID).Label("ID").DefaultDesc() %>
	<%= head.Sortable(c => c.Name) %>
	<%= head.Sortable(c => c.Address.Planet.Name).Label("Planet") %>
<% })
.Body(customer => { %>
	<td><%= customer.ID %></td>
	<td><a href="<%= Url.Action("Edit", new { id = customer.ID }) %>"><%= customer.Name %></a></td>
	<td><%= customer.Address.Planet.Name %></td>
<% }); %>
</asp:Content>